/**
 * jims
 */
package com.jims.master.modules.base.user.entity;


import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 科室表Entity
 * @author xueyx
 * @version 2017-06-01
 */
public class SysDepartment extends DataEntity<SysDepartment> {
	
	private static final long serialVersionUID = 1L;
	private String depNo;		// 科室编号
	private SysDepartment parent;		// 父级科室一级的父级科室编号0
	private String depName;		// 科室名称
	private String sorting;		// 排序
	private String isShow;		// 显示标志
	private String instructions;		// 介绍

	private List<SysDepartment> sysDepartmentList;

	/*@JsonBackReference*/
	public List<SysDepartment> getSysDepartmentList() {
		return sysDepartmentList;
	}

	public void setSysDepartmentList(List<SysDepartment> sysDepartmentList) {
		this.sysDepartmentList = sysDepartmentList;
	}

	public SysDepartment() {
		super();
	}

	public SysDepartment(String id){
		super(id);
	}

	@Length(min=1, max=20, message="科室编号长度必须介于 1 和 20 之间")
	public String getDepNo() {
		return depNo;
	}

	public void setDepNo(String depNo) {
		this.depNo = depNo;
	}
	
	@JsonBackReference
	public SysDepartment getParent() {
		return parent;
	}

	public void setParent(SysDepartment parent) {
		this.parent = parent;
	}
	
	@Length(min=0, max=50, message="科室名称长度必须介于 0 和 50 之间")
	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public String getSorting() {
		return sorting;
	}

	public void setSorting(String sorting) {
		this.sorting = sorting;
	}
	
	@Length(min=0, max=1, message="显示标志长度必须介于 0 和 1 之间")
	public String getIsShow() {
		return isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}
	
	@Length(min=0, max=200, message="介绍长度必须介于 0 和 200 之间")
	public String getInstructions() {
		return instructions;
	}

	public void setInstructions(String instructions) {
		this.instructions = instructions;
	}
	
}